package cn.iocoder.yudao.module.vote.constants;


import java.awt.*;

/**
 * @description:
 * @author: moving
 * @date: 2022/7/12 16:08
 */
public enum VotePersonTypeEnum {

    /**
     * 1、党政主要领导 2、其他领导 3、课题组成员 4、课题组组长
     */

    PARTY_LEADER(1,0.5,"党政主要领导"),
    OTHER_LEADERS(2,0.3,"其他领导"),
    TEAM_LEADER(4,0.2,"课题组组长"),
    TEAM_MEMBER(3,0.2,"课题组成员"),
    ;

    private Integer value;

    private String remark;
    /**
     * 权重
     */
    private Double weight;

    VotePersonTypeEnum(Integer value,Double weight, String remark){
        this.value = value;
        this.remark = remark;
        this.weight = weight;
    }


    public static VotePersonTypeEnum getVotePersonType(Integer value){
        for(VotePersonTypeEnum votePersonTypeEnum:VotePersonTypeEnum.values()){
            if(votePersonTypeEnum.getValue().equals(value)){
                return votePersonTypeEnum;
            }
        }
        return null;
    }


    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String ggetRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
